include $(LITEOSTOPDIR)/config.mk

MODULE_NAME := nand_flash

ifeq ($(NAND_DRIVER_DIR),hinfc620)
SRCS_COMMON_DEL0 = src/common/spi_nand_ids.c
SRCS_COMMON_DEL1 = src/common/hifmc_common.c
endif
ifeq ($(NAND_DRIVER_DIR),hifmc100_nand)
SRCS_COMMON_DEL0 = src/common/spi_nand_ids.c
endif

ifeq ($(NAND_DRIVER_DIR),hisnfc100)
SRCS_COMMON_DEL0 = src/common/parallel_nand_ids.c
SRCS_COMMON_DEL1 = src/common/hifmc_common.c
endif
ifeq ($(NAND_DRIVER_DIR),hifmc100)
SRCS_COMMON_DEL0 = src/common/parallel_nand_ids.c
endif

SRCS_HOST = $(wildcard src/$(NAND_DRIVER_DIR)/*.c)

SRCS_COMMON_TMP0 = $(wildcard src/common/*.c)

SRCS_COMMON_TMP1 = $(subst $(SRCS_COMMON_DEL0),,$(SRCS_COMMON_TMP0))
SRCS_COMMON = $(subst $(SRCS_COMMON_DEL1),,$(SRCS_COMMON_TMP1))

LOCAL_SRCS := $(SRCS_COMMON) $(SRCS_HOST)

NAND_INCLUDE := -I $(LITEOSTOPDIR)/drivers/mtd/common/include/
NAND_INCLUDE += -I $(LITEOSTOPDIR)/drivers/mtd/nand/src/common/
LOCAL_FLAGS := -Wno-unused-variable $(NAND_INCLUDE)

include $(MODULE)
